/* ===========================================================
   Scott Dodson Solutions
   styles.css
   =========================================================== */

/* ---------- Reset ---------- */

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

html{
    scroll-behavior:smooth;
}

body{
    font-family:-apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    line-height:1.6;

    color:#333;

    background:#ffffff;
}

/* ---------- Variables ---------- */

:root{
    --primary:#004b87;
    --secondary:#0074d9;
    --accent:#00a6d6;
    --light:#f8f9fb;
    --gray:#666;
    --border:#dddddd;
    --shadow:
        0 8px 20px rgba(0,0,0,.08);
    --radius:8px;
    --container:1200px;
    --transition:.25s ease;
}

/* ---------- Typography ---------- */

h1,h2,h3,h4{

    color:var(--primary);

    font-weight:600;

    line-height:1.2;

    margin-bottom:1rem;

}

h1{

    font-size:2rem;

}

h2{

    font-size:2.25rem;

    margin-bottom:2rem;

}

h3{

    font-size:1.4rem;

}

p{

    margin-bottom:1rem;

}

a{

    color:var(--secondary);

    text-decoration:none;

    transition:var(--transition);

}

a:hover{

    color:var(--accent);

}

ul{

    list-style-position:inside;

}

/* ---------- Layout ---------- */

.container{

    width:min(92%,var(--container));

    margin:auto;

}

.section{
    padding:5rem 0;
}

img{

    max-width:100%;

    display:block;

}

/* ---------- Buttons ---------- */

.button,
button{

    display:inline-block;

    padding:.9rem 2rem;

    background:var(--primary);

    color:white;

    border:none;

    border-radius:var(--radius);

    cursor:pointer;

    transition:var(--transition);

    font-size:1rem;

}

.button:hover,
button:hover{

    background:var(--secondary);

}

/* ===========================================================
   HEADER
   =========================================================== */

.site-header{

    position:sticky;

    top:0;

    z-index:1000;

    background:white;

    box-shadow:0 2px 8px rgba(0,0,0,.08);

}

.site-header .container{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:1rem 0;

}

.branding h1{

    margin-bottom:.25rem;

}

.branding a{

    color:var(--gray);

    font-size:.95rem;

}

nav ul{

    display:flex;

    gap:2rem;

    list-style:none;

}

nav a{

    color:var(--primary);

    font-weight:600;

}

nav a:hover{

    color:var(--accent);

}

.center{
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%;
}

/* ===========================================================
   HERO
   =========================================================== */

.hero{
/* this makes a light gray brackground for everything after the header
    background:linear-gradient(
        135deg,
        #f8fbff,
        #edf5ff);
*/
    padding:6rem 0;

    text-align:center;

}

.hero h2{

    font-size:3rem;

}

.hero h3{

    color:var(--secondary);

    margin-bottom:1rem;

/* THIS IS NEW: */
    text-align:left;
    max-width:800px;
    margin:2rem auto;
}

.lead{

    font-size:1.3rem;

    color:var(--gray);

    margin-bottom:2rem;

}

.black{

    font-size:1.9rem;

    color:var(--black);

    margin-bottom:3rem;

}

.highlights{

    max-width:800px;

    margin:2rem auto;

    text-align:left;

}

/* no longer needed since I am not doing bullet points anymore */
.highlights li{

    margin-bottom:.75rem;

}

/* ===========================================================
   PART 4 — RECENT PROJECTS
   =========================================================== */

#projects{
    background:#ffffff;
}

#projects .container{
    display:grid;
    gap:2rem;
}

#projects article{
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:2rem;
    box-shadow:var(--shadow);
    transition:transform .25s ease,
               box-shadow .25s ease;
}

#projects article:hover{
    transform:translateY(-6px);
    box-shadow:0 18px 35px rgba(0,0,0,.12);
}

#projects h3{
    margin-bottom:.5rem;
}

#projects p:last-child{
    margin-bottom:0;
}

/* ===========================================================
   PART 5 — SKILLS
   =========================================================== */

#skills{
    background:var(--light);
}

.skills-grid{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(280px,1fr));

    gap:2rem;

}

.skills-grid > div{

    background:white;

    border-radius:var(--radius);

    padding:2rem;

    box-shadow:var(--shadow);

    border-top:5px solid var(--primary);

}

.skills-grid h3{

    margin-bottom:1rem;

}

.skills-grid p{

    color:var(--gray);

    line-height:1.8;

}

/* ===========================================================
   PART 6 — EDUCATION / EXPERIENCE
   =========================================================== */

.timeline{

    position:relative;

    margin-left:1rem;

    border-left:4px solid var(--primary);

    padding-left:2rem;

}

.timeline-item{

    position:relative;

    background:white;

    border-radius:var(--radius);

    margin-bottom:2rem;

    padding:2rem;

    box-shadow:var(--shadow);

}

.timeline-item::before{

    content:"";

    position:absolute;

    left:-2.7rem;

    top:2rem;

    width:18px;

    height:18px;

    border-radius:50%;

    background:var(--primary);

    border:4px solid white;

}

.timeline ul{

    margin-top:1rem;

    margin-left:1rem;

}

.timeline li{

    margin-bottom:.6rem;

}

/* ===========================================================
   PART 7 — CONTACT
   =========================================================== */

#contact{

    background:var(--light);

}

.contact-intro{

    max-width:700px;

    margin-bottom:2rem;

}

.contact-card{

    margin-bottom:2rem;

    padding:1.5rem;

    background:white;

    border-left:5px solid var(--secondary);

    border-radius:var(--radius);

    box-shadow:var(--shadow);

}

.contact-form{

    display:grid;

    gap:1.5rem;

}

.form-row{

    display:flex;

    flex-direction:column;

}

.form-row label{

    margin-bottom:.5rem;

    font-weight:600;

}

input,
textarea{

    width:100%;

    padding:.9rem;

    border:1px solid #ccc;

    border-radius:var(--radius);

    font-size:1rem;

    transition:.25s;

    background:white;

}

input:focus,
textarea:focus{

    outline:none;

    border-color:var(--secondary);

    box-shadow:0 0 0 4px rgba(0,116,217,.12);

}

textarea{

    resize:vertical;

}

/* ===========================================================
   PART 8 — FOOTER
   =========================================================== */

.site-footer{

    background:#1e2933;

    color:white;

    padding:3rem 0;

}

.site-footer .container{

    display:flex;

    justify-content:space-between;

    align-items:center;

    flex-wrap:wrap;

    gap:1rem;

}

.site-footer nav{

    display:flex;

    gap:1.5rem;

}

.site-footer a{

    color:white;

}

.site-footer a:hover{

    color:#9fd8ff;

}

/* ===========================================================
   PART 9 — RESPONSIVE
   =========================================================== */

@media (max-width:900px){

.site-header .container{

    flex-direction:column;

    gap:1rem;

}

nav ul{

    flex-wrap:wrap;

    justify-content:center;

    gap:1rem;

}

.hero{

    padding:4rem 0;

}

.hero h2{

    font-size:2.3rem;

}

}

@media (max-width:768px){

.section{

    padding:3rem 0;

}

.container{

    width:94%;

}

.skills-grid{

    grid-template-columns:1fr;

}

.timeline{

    border-left:none;

    margin-left:0;

    padding-left:0;

}

.timeline-item::before{

    display:none;

}

.site-footer .container{

    flex-direction:column;

    text-align:center;

}

.site-footer nav{

    justify-content:center;

    flex-wrap:wrap;

}

}

@media (max-width:480px){

h1{

    font-size:1.5rem;

}

h2{

    font-size:1.8rem;

}

.hero h2{

    font-size:2rem;

}

.button,
button{

    width:100%;

}

nav ul{

    flex-direction:column;

    align-items:center;

}

}

/* ===========================================================
   PART 10 — UTILITIES / DARK MODE / PRINT
   =========================================================== */

.text-center{

    text-align:center;

}

.mt-1{margin-top:1rem;}
.mt-2{margin-top:2rem;}
.mt-3{margin-top:3rem;}

.mb-1{margin-bottom:1rem;}
.mb-2{margin-bottom:2rem;}
.mb-3{margin-bottom:3rem;}

.hidden{

    display:none;

}

/* ---------- Dark Mode ---------- */

@media (prefers-color-scheme:dark){

:root{

    --primary:#8fc7ff;
    --secondary:#56b4ff;
    --accent:#6fd3ff;

    --light:#222831;

    --gray:#d7d7d7;

    --border:#444;

}

body{

    background:#121212;

    color:#eeeeee;

}

.site-header{

    background:#1b1b1b;

}

.site-footer{

    background:#0c0c0c;

}

#projects article,
.skills-grid > div,
.timeline-item,
.contact-card{

    background:#1e1e1e;

}

input,
textarea{

    background:#262626;

    color:white;

    border-color:#555;

}

}

/* ---------- Print ---------- */

@media print{

.site-header,
.site-footer,
button{

    display:none;

}

body{

    background:white;

    color:black;

}

.section{

    padding:1rem 0;

}

a{

    color:black;

    text-decoration:none;

}

}

/* ===========================================================
   JavaScript Support
   =========================================================== */

nav a.active {
    color: var(--accent);
    font-weight: 700;
}

.fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

.fade.visible {
    opacity: 1;
    transform: translateY(0);
}

#backToTop {
    background: var(--primary);
    color: #fff;
    border: none;
    box-shadow: var(--shadow);
    transition: background .2s ease, transform .2s ease;
}

#backToTop:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* ==========================================
   Mobile Navigation
   ========================================== */

.menu-toggle {

    display: none;

    background: none;

    border: none;

    color: var(--primary);

    font-size: 2rem;

    cursor: pointer;

}

/* Desktop */

#site-nav {

    display: block;

}

/* Mobile */

@media (max-width:768px) {

.menu-toggle {

    display:block;

}

#site-nav {

    display:none;

    width:100%;

    margin-top:1rem;

}

#site-nav.open {

    display:block;

}

#site-nav ul {

    display:flex;

    flex-direction:column;

    gap:0;

}

#site-nav li {

    border-top:1px solid var(--border);

}

#site-nav a {

    display:block;

    padding:1rem;

}

}

/* ==========================================
   Mobile Navigation
   ========================================== */

.menu-toggle {

    display: none;

    background: none;

    border: none;

    color: var(--primary);

    font-size: 2rem;

    cursor: pointer;

}

/* Desktop */

#site-nav {

    display: block;

}

/* Mobile */

@media (max-width:768px) {

.menu-toggle {

    display:block;

}

#site-nav {

    display:none;

    width:100%;

    margin-top:1rem;

}

#site-nav.open {

    display:block;

}

#site-nav ul {

    display:flex;

    flex-direction:column;

    gap:0;

}

#site-nav li {

    border-top:1px solid var(--border);

}

#site-nav a {

    display:block;

    padding:1rem;

}

}
